home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / bin / cpanp < prev    next >
Encoding:
Text File  |  2012-12-11  |  3.3 KB  |  108 lines

  1. #!/usr/bin/perl
  2.     eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
  3.     if $running_under_some_shell;
  4. #!/usr/bin/perl
  5. # $File: //depot/cpanplus/dist/bin/cpanp $
  6. # $Revision: #8 $ $Change: 8345 $ $DateTime: 2003/10/05 19:25:48 $
  7.  
  8. use strict;
  9. use vars '$VERSION';
  10.  
  11. use CPANPLUS;
  12. $VERSION = CPANPLUS->VERSION;
  13.  
  14. use CPANPLUS::Shell qw[Default];
  15. my $shell = CPANPLUS::Shell->new;
  16.  
  17. ### if we're given a command, run it; otherwise, open a shell.
  18. if (@ARGV) {
  19.     ### take the command line arguments as a command
  20.     my $input = "@ARGV";
  21.     ### if they said "--help", fix it up to work.
  22.     $input = 'h' if $input =~ /^\s*--?h(?:elp)?\s*$/i;
  23.     ### strip the leading dash
  24.     $input =~ s/^\s*-//;
  25.     ### pass the command line to the shell
  26.     ### exit with a useful return value on return
  27.     exit not $shell->dispatch_on_input(input => $input, noninteractive => 1);
  28. } else {
  29.     ### open a shell for the user
  30.     $shell->shell();
  31. }
  32.  
  33. =head1 NAME
  34.  
  35. cpanp - The CPANPLUS launcher
  36.  
  37. =head1 SYNOPSIS
  38.  
  39. B<cpanp>
  40.  
  41. B<cpanp> S<[-]B<a>> S<[ --[B<no>-]I<option>... ]> S< I<author>... >
  42.  
  43. B<cpanp> S<[-]B<mfitulrcz>> S<[ --[B<no>-]I<option>... ]> S< I<module>... >
  44.  
  45. B<cpanp> S<[-]B<d>> S<[ --[B<no>-]I<option>... ]> S<[ --B<fetchdir>=... ]> S< I<module>... >
  46.  
  47. B<cpanp> S<[-]B<xb>> S<[ --[B<no>-]I<option>... ]>
  48.  
  49. B<cpanp> S<[-]B<o>> S<[ --[B<no>-]I<option>... ]> S<[ I<module>... ]>
  50.  
  51. =head1 DESCRIPTION
  52.  
  53. This script launches the B<CPANPLUS> utility to perform various operations
  54. from the command line. If it's invoked without arguments, an interactive
  55. shell is executed by default.
  56.  
  57. Optionally, it can take a single-letter switch and one or more argument,
  58. to perform the associated action on each arguments.  A summary of the
  59. available commands is listed below; C<cpanp -h> provides a detailed list.
  60.  
  61.     h                   # help information
  62.     v                   # version information
  63.  
  64.     a AUTHOR ...        # search by author(s)
  65.     m MODULE ...        # search by module(s)
  66.     f MODULE ...        # list all releases of a module
  67.  
  68.     i MODULE ...        # install module(s)
  69.     t MODULE ...        # test module(s)
  70.     u MODULE ...        # uninstall module(s)
  71.     d MODULE ...        # download module(s)
  72.     l MODULE ...        # display detailed information about module(s)
  73.     r MODULE ...        # display README files of module(s)
  74.     c MODULE ...        # check for module report(s) from cpan-testers
  75.     z MODULE ...        # extract module(s) and open command prompt in it
  76.  
  77.     x                   # reload CPAN indices
  78.  
  79.     o [ MODULE ... ]    # list installed module(s) that aren't up to date
  80.     b                   # write a bundle file for your configuration
  81.  
  82. Each command may be followed by one or more I<options>.  If preceded by C<no>,
  83. the corresponding option will be set to C<0>, otherwise it's set to C<1>.
  84.  
  85. Example: To skip a module's tests,
  86.  
  87.     cpanp -i --skiptest MODULE ...
  88.  
  89. Valid options for most commands are C<cpantest>, C<debug>, C<flush>, C<force>,
  90. C<prereqs>, C<storable>, C<verbose>, C<md5>, C<signature>, and C<skiptest>; the
  91. 'd' command also accepts C<fetchdir>.  Please consult L<CPANPLUS::Configure>
  92. for an explanation to their meanings.
  93.  
  94. Example: To download a module's tarball to the current directory,
  95.  
  96.     cpanp -d --fetchdir=. MODULE ...
  97.  
  98. =cut
  99.  
  100. 1;
  101.  
  102. # Local variables:
  103. # c-indentation-style: bsd
  104. # c-basic-offset: 4
  105. # indent-tabs-mode: nil
  106. # End:
  107. # vim: expandtab shiftwidth=4:
  108.